﻿using MQTT.Server.GlobalConfig;
using SqlSugar;
using System.Security.Principal;

namespace MQTT.Server.DataBase
{
    /// <summary>
    /// 应用程序日志
    /// </summary>
    [SugarTable("mqtt_log", TableDescription = "应用程序日志表")]
    public partial class AppLogEntity
    {
        [SugarColumn(CreateTableFieldSort = 1, IsIdentity = true, IsPrimaryKey = true, ColumnDescription = "主键Id")]
        public long Id { get; set; }

        [SugarColumn(CreateTableFieldSort = 2, ColumnDescription = "客户端ID", IsNullable = true)]
        public string ClientId { get; set; }
        
        [SugarColumn(CreateTableFieldSort = 3, ColumnDescription = "时间", IsNullable = false)]
        public DateTime LogTime { get; set; }

        [SugarColumn(CreateTableFieldSort = 4, ColumnDescription = "日志等级", IsNullable = true)]
        public string LogType { get; set; }

        [SugarColumn(CreateTableFieldSort = 5, ColumnDescription = "客户端IP", IsNullable = true)]
        public string Source { get; set; }

        [SugarColumn(CreateTableFieldSort = 6, ColumnDescription = "全部日志消息", IsNullable = false, ColumnDataType = "varchar(max)")]
        public string Logger { get; set; }

        [SugarColumn(CreateTableFieldSort = 7, ColumnDescription = "备注", IsNullable = true)]
        public string Remark { get; set; }

        [SugarColumn(CreateTableFieldSort = 8, ColumnDescription = "异常", IsNullable = true, ColumnDataType = "varchar(max)")]
        public string Exception { get; set; }

        [SugarColumn(CreateTableFieldSort = 9, ColumnDescription = "MQTT版本", IsNullable = true)]
        public string MqVersion { get; set; }
    }

}
